<?php
  session_cache_limiter('private,must-revalide');
   /**
   * 处理上传页面
   */ 
  if ($_POST['btn_sub'])
  {
    $cate_id = 0; //分类
	//date_default_timezone_set('Asia/Shanghai');
	$time=date('Y-m-d');
	$time1=date('Y-m-d H:i:s');       
   	$personnel = work_str($_POST["chinese_edit"], 1);				//中文内容	
	$cont1 = array("<p>","</p>");
	$cont2 = array("","</br>");
	$personnel = str_replace($cont1, $cont2, $personnel);
	
	$query = "UPDATE $TBL_SET SET personnel='$personnel' where id =1";		
    $res = mysql_query($query) or die(mysql_error());
	$insert_id = mysql_insert_id();	
	
		 MyNotice("人員招募編輯成功", 1, "news.php");
		 exit(0);
  } 
	
  $query = "SELECT * FROM $TBL_SET WHERE id='1'";
  $result = mysql_query( $query ) or die(mysql_error());
  $rows = mysql_fetch_array( $result);
  include_once("list_cate.php");
  $time1=date('Y-m-d H:i:s');
  $tpl -> set_file(array("main" => "personnel.htm"));
  $tpl -> set_block("main","TYPE_LIST","type_list");
  //加载FCKeditor编辑器
  include($conf["base_path"] ."fckeditor/fckeditor.php");
  //1
  $editor = new FCKeditor('chinese_edit');
  $editor -> BasePath   = "../../fckeditor/";
  $editor -> ToolbarSet = "Normal";
  $editor -> Width      = "100%";
  $editor -> Height     = "600";
  $editor -> Value      = $rows['personnel'];  
  $chinese_edit = $editor->CreateHtml();
 
  $tpl -> set_var(array(                        
	     				 "CHINESE_EDIT" => $chinese_edit,
						 "ENGLISH_EDIT" => $english_edit,
						 "ENGLISH_EDIT2" =>$english_edit2,						
                       ));
 
  $tpl->set_var($conf);
  $tpl -> parse("Output", "main");
  $tpl -> p("Output");
  exit(0);
?>